import { createRouter, createWebHistory } from 'vue-router'

import Layout from '@/views/layout/layout.vue'
import MainPage from '@/views/mainPage/mainpage.vue'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Layout,
      redirect: '/main',
      children: [
        {path: 'main',name: 'main',component: MainPage}
      ]

    }
  ]
})

export default router
